package com.adnaan.backend.mapper;

import com.adnaan.backend.entity.Medicinal;
import com.adnaan.backend.entity.Pictures;
import com.adnaan.backend.entity.dto.OptionDto;
import com.adnaan.backend.entity.dto.PictureListDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * author: adnaan
 * create: 2025-02-03 13:48
 * Description:
 */
@Mapper
public interface MedicinalMapper extends BaseMapper<Medicinal> {
    List<OptionDto> getEfficacy(@Param("materialId") Long id);

    boolean deleteEfficacy(@Param("materialId") Long id, @Param("efficacyId") Long efficacyId);

    boolean deleteAllEfficacy(@Param("materialId") Long materialId);

    void insertEfficacy(@Param("materialId") Long materialId, @Param("efficacyId") Long efficacyId);

    String getDefaultPicture(@Param("materialId") Long id);

    void insertPictures(@Param("pic") Pictures pictureRecord);

    List<PictureListDto> pictures(@Param("materialId") Long materialId);

    boolean deletePicture(@Param("picId") Long picId);
}
